<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>[$result.form.FormTitle]</title>
        <style>
        	.form-entry{
        		margin:20px auto 10px auto;
        	}
			body{
				width:99%;
				font-family:Arial,sans-serif;
				font-size:14px;
			}
			h3{
				color:gray;
			}
			#form_wraps{
				margin:0 auto;
				/*width:650px;*/
			}
			.widget-group-ul {
			border:0 none;
			list-style-image:none;
			list-style-position:outside;
			list-style-type:none;
			margin:0;
			padding:0;
			}
			
			.widget_entry{
				margin:10px auto;
			}
			.q-help{
				color:#666666;
				display:block;
				margin:0.1em 0 0.25em;
			}
			.note{
				color:#666666;
				margin:0.1em 0 0.25em;
				font-size:12px;
			}
			#yzm_wrap{
				display:none
			}
			.input{
				border:1px solid #CCCCCC;
				color:#999999;
				height:18px;
				padding:3px 0 2px 2px;
				width:271px;
			}
			.input_other{
				border:1px solid #CCCCCC;
				color:#999999;
				height:18px;
				padding:3px 0 2px 2px;
				width:160px;
			}
        	.textarea {
				border:1px solid #CCCCCC;
				color:#999999;
				padding:3px 0 2px 2px;
			}
			.yzm{
				border:1px solid #CCCCCC;
				height:18px;
				padding:3px 0 2px 2px;
				width:96px;
				color:#999999;
			}
			
			.tijiao {
				-moz-background-clip:border;
				-moz-background-inline-policy:continuous;
				-moz-background-origin:padding;
				background:transparent url(http://res.61.com/images/service/button.gif) no-repeat scroll 0 -47px;
				display:block;
				height:25px;
				line-height:25px;
				margin-top:5px;
				width:75px;
				font-weight:bold;
				text-align:center;
				color:#FFFFFF;
				text-decoration:none;
			}
        </style>
		<link rel="stylesheet" href="/html/js/ui/fbox/css/facebox.css" type="text/css" >
    </head>
    <body>
    	<div id="form_wraps">
	        <h1>[$result.form.FormTitle]</h1>
	        <h3>[$result.form.FormDescription]</h3>
	        <form method="POST" id="sv-form" action="/form/responseForm">
	        	<input type="hidden" name="key" value="[$result.form.FormKey]">
				<input type="hidden" name="FormId" value="[$result.form.FormId]">
	            <foreach name="result.form.Entries" key="key" var="item">
	                <div class="form-entry" id="[$item.Position]" entry_id="[$item.EntryId]" is_Goto="[$item.is_Goto]">
	                    <label class="q-title">
	                        [$item.QuestionTitle]
							<if $item.Required>
								<span mark="require" style="color:red">*</span>
							</if>
	                    </label><br/>
	                    <label class="q-help">
	                        [$item.HelpText]
	                    </label>
	                  	<if $item.EntryType == '1'>
	                  		<div class="widget_entry">
	                  			<input type="text" class="input" name="[$item.EntryId]"
								 maxlength=50 value="">
							</div>
	                  	<elseif $item.EntryType == '2'>
	                  		<div class="widget_entry">
	                  			<textarea class="textarea" cols="50" rows="6" id="[$item.EntryId]_" name="[$item.EntryId]"
								onkeyup="return charLimit('[$item.EntryId]_','lestNum_[$item.EntryId]',100);"
								></textarea>
								<div><label class="note">共可输入 100 字，还剩 <label style="color:red" id="lestNum_[$item.EntryId]">100</label>字。</label></div>
	                  		</div>
						<elseif $item.EntryType == '3'>
	                  		<div class="widget_entry"">
		                  		<ul class="widget-group-ul">
		                  			<foreach name="item.Choices" var="item_c" key="key_c">
			                  			<li>
			                  					<if $item_c.SelectedByDefault>
			                  						<if $item_c.is_other>
			                  							<input type="radio" checked="true" name="[$item.EntryId]" mark="other.[$item.EntryId]"> 
														<label>其他: <input type="text" class="input_other" onchange='$("[mark=other.[$item.EntryId]]").val(this.value)' maxlength=50 mark="other" value=""></label>
													<else>
														<label>
															<if $item.is_Goto>
																<input type="radio" gotopage="[$item_c.GoToQues]" checked="true"  value="[$key_c]" name="[$item.EntryId]">
															<else>
																<input type="radio" checked="true"  value="[$key_c]" name="[$item.EntryId]">
															</if>
														[$item_c.Value]
														<if @trim($item_c.Img_url)>
															<img align="absmiddle" src="http://[$item_c.Img_url]">
														</if>
														</label>
			                  						</if>
				                  				<else>
				                  					<if $item_c.is_other>
			                  							<input type="radio" name="[$item.EntryId]" mark="other.[$item.EntryId]">
														<label>其他: <input type="text" class="input_other" onchange='$("[mark=other.[$item.EntryId]]").val(this.value)' maxlength=50 mark="other" value=""></label>
													<else>
														<label>
															<if $item.is_Goto>
																<input type="radio" gotopage="[$item_c.GoToQues]"  value="[$key_c]" name="[$item.EntryId]">
															<else>
																<input type="radio"  value="[$key_c]" name="[$item.EntryId]">
															</if>
														[$item_c.Value]
														<if @trim($item_c.Img_url)>
															<img align="absmiddle" src="http://[$item_c.Img_url]">
														</if>
														</label>
			                  						</if>
				                  				</if>
										</li>
									</foreach>
								</ul>
							</div>
	                  	<elseif $item.EntryType == '4'>
	                  		<div class="widget_entry"">
		                  		<ul class="widget-group-ul">
		                  			<foreach name="item.Choices" var="item_c" key="key_c">
			                  			<li>
		                  					<if $item_c.SelectedByDefault>
		                  						<if $item_c.is_other>
		                  							<input type="checkbox" checked="true"  name="[$item.EntryId][]" mark="other.[$item.EntryId]">
													<label> 其他: <input class="input_other" onchange='$("[mark=other.[$item.EntryId]]").val(this.value)' type="text" maxlength=50 mark="other" value=""></label>
												<else>
													<label>
													<input type="checkbox"  checked="true"  value="[$key_c]" name="[$item.EntryId][]">
													[$item_c.Value]
													<if @trim($item_c.Img_url)>
														<img align="absmiddle" src="http://[$item_c.Img_url]">
													</if>
													</label>
		                  						</if>
			                  				<else>
			                  					<if $item_c.is_other>
			                  						<input type="checkbox" name="[$item.EntryId][]"  mark="other.[$item.EntryId]"> 
													<label>其他: <input class="input_other" onchange='$("[mark=other.[$item.EntryId]]").val(this.value)' type="text" maxlength=50 mark="other" value=""></label>
												<else>
													<label>
													<input type="checkbox"  value="[$key_c]" name="[$item.EntryId][]">
													[$item_c.Value]
													<if @trim($item_c.Img_url)>
														<img align="absmiddle" src="http://[$item_c.Img_url]">
													</if>
													</label>
		                  						</if>
			                  				</if>
										</li>
									</foreach>
								</ul>
							</div>
	                  	<elseif $item.EntryType == '5'>
	                  		<div class="widget_entry"">
		                  		<select name="[$item.EntryId]">
		                  			<foreach name="item.Choices" var="item_c" key="key_c">
		                  				<if $item_c.SelectedByDefault>
		                  					<option selected="true" value="[$key_c]">[$item_c.Value]</option>
		                  				<else>
		                  					<option value="[$key_c]">[$item_c.Value]</option>
		                  				</if>
		                  			</foreach>
								</select>
							</div>
	                  	</if>
	                </div>
	            </foreach>
				<div>
					<div class="form-entry">
		                    <label class="q-title">
		                       	 请输入验证码
							</label><br>
		              	    <div class="widget_entry">
		              			<input class='yzm' class="w170" maxlength="4" id="yzm" name="seccode" />
							</div>
		            </div>
					
					<div id="yzm_wrap">
						<span style="font-size:12px;color:gray">输入下图中的字符，不区分大小写</span><br/>
						<img id="verifyCodeImage" alt="" onclick="this.src='/verifycode.php?act=init&' + Math.random();"  src="" style="margin:0 5px;" />
						<a href="javascript:;" id='changeVerify' onclick="return getSeccode('verifyCodeImage');" style="color:#FF6600">换一张</a>
					</div>
					<br/>
					<a class="tijiao" name="submit_form" href="javascript:;" id="submit_form">提交</a>
				</div>
	        </form>
		</div>
		<script type="text/javascript" src="/html/js/base.js">
        </script>
		<script type="text/javascript" src="/html/js/web/preview.js">
        </script>
		<script type="text/javascript" src="/html/js/ui/fbox/js/facebox.js"></script>
    </body>
</html>
